import request from "@/utils/request";
// 列表接口
export function fetchdata(data) {
  return request({
    url: "/",
    method: "GET",
    params: data,
  });
}

// 删除接口
export function deldata(id) {
  return request({
    url: `/${id}`,
    method: "DELETE",
  });
}

//搜索接口
export function addname(data) {
  return request({
    url: "/",
    method: "GET",
    params: data,
  });
}

// 新增接口
export function getdata(data) {
  return request({
    url: "/",
    method: "POST",
    data,
  });
}

// 编辑接口
export function getquerydata(data) {
  return request({
    url: `/${data.id}`,
    method: "PUT",
    data,
  });
}
// 详情接口
export function setData(id) {
  return request({
    url: `/${id}`,
    method: "GET",
  });
}
